<?php


namespace app\admin\model;

use think\facade\Db;
class IndexModel
{
    public function select($where = []){
        $select=Db::name('daoyou')->where($where)->paginate(15);
//        echo Db::name('daoyou')->getLastSql();exit;

        return $select;
    }
    public function find($id){
        $find=Db::name('daoyou')->find($id);
        return $find;
    }
    public function edit($id){
        $edit=Db::name('daoyou')->update($id);
        return $edit;
    }
    public function del($id){
        $del=Db::name('daoyou')->delete($id);
        return $del;
    }
}